package com.wmh.baseservice.merchant.pojo;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2022-12-05
 */
@ApiModel(value="MerchantVegetable对象", description="商家蔬菜(产品)表")
public class MerchantVegetable implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "状态:	0正常 -1下架")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "商家id（土地原持有商家id）")
    private Long merchantId;

    @ApiModelProperty(value = "菜地区域id(果蔬归属具体看用户下单时该区域属于哪个商家)")
    private Long regionId;

    @ApiModelProperty(value = "菜地id")
    private Long plotId;

    @ApiModelProperty(value = "分类id")
    private Long categoryId;

    @ApiModelProperty(value = "头图")
    private String avatar;

    @ApiModelProperty(value = "轮播图,5张")
    private String img;

    @ApiModelProperty(value = "视频")
    private String video;

    @ApiModelProperty(value = "简介")
    private String overview;

    @ApiModelProperty(value = "详情")
    private String content;

    @ApiModelProperty(value = "价格(标准为xx元/斤)")
    private BigDecimal price;

    @ApiModelProperty(value = "销量")
    private Integer sale;

    @ApiModelProperty(value = "库存")
    @TableField("Inventory")
    private Integer inventory;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "0采摘 1种植 2全支持")
    private Integer type;

    @ApiModelProperty(value = "种植价格")
    private BigDecimal growPrice;

    @ApiModelProperty(value = "种植数量")
    private Integer count;

    @ApiModelProperty(value = "路径id")
    private Long urlId;

    @ApiModelProperty(value = "种植库存（种子或其他等）")
    private Integer growInventory;

    @ApiModelProperty(value = "推广佣金")
    private BigDecimal commission;

    @ApiModelProperty(value = "是否支持发快递1支持- 1不支持")
    private Integer hasCourier;

    @ApiModelProperty(value = "运费模板id")
    private Long freightId;

    /**
     * 购物车数量
     */
    @TableField(exist = false)
    private Double carCount;

    @TableField(exist = false)
    private Double growCarCount;

    public Double getGrowCarCount() {
        return growCarCount;
    }

    public void setGrowCarCount(Double growCarCount) {
        this.growCarCount = growCarCount;
    }

    public Double getCarCount() {
        return carCount;
    }

    public void setCarCount(Double carCount) {
        this.carCount = carCount;
    }

    public Long getId() {
        return id;
    }

    public MerchantVegetable setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public MerchantVegetable setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public MerchantVegetable setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public MerchantVegetable setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public MerchantVegetable setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public MerchantVegetable setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public Long getMerchantId() {
        return merchantId;
    }

    public MerchantVegetable setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
        return this;
    }
    public Long getRegionId() {
        return regionId;
    }

    public MerchantVegetable setRegionId(Long regionId) {
        this.regionId = regionId;
        return this;
    }
    public Long getPlotId() {
        return plotId;
    }

    public MerchantVegetable setPlotId(Long plotId) {
        this.plotId = plotId;
        return this;
    }
    public Long getCategoryId() {
        return categoryId;
    }

    public MerchantVegetable setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
        return this;
    }
    public String getAvatar() {
        return avatar;
    }

    public MerchantVegetable setAvatar(String avatar) {
        this.avatar = avatar;
        return this;
    }
    public String getImg() {
        return img;
    }

    public MerchantVegetable setImg(String img) {
        this.img = img;
        return this;
    }
    public String getVideo() {
        return video;
    }

    public MerchantVegetable setVideo(String video) {
        this.video = video;
        return this;
    }
    public String getOverview() {
        return overview;
    }

    public MerchantVegetable setOverview(String overview) {
        this.overview = overview;
        return this;
    }
    public String getContent() {
        return content;
    }

    public MerchantVegetable setContent(String content) {
        this.content = content;
        return this;
    }
    public BigDecimal getPrice() {
        return price;
    }

    public MerchantVegetable setPrice(BigDecimal price) {
        this.price = price;
        return this;
    }
    public Integer getSale() {
        return sale;
    }

    public MerchantVegetable setSale(Integer sale) {
        this.sale = sale;
        return this;
    }
    public Integer getInventory() {
        return inventory;
    }

    public MerchantVegetable setInventory(Integer inventory) {
        this.inventory = inventory;
        return this;
    }
    public String getTitle() {
        return title;
    }

    public MerchantVegetable setTitle(String title) {
        this.title = title;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public MerchantVegetable setType(Integer type) {
        this.type = type;
        return this;
    }
    public BigDecimal getGrowPrice() {
        return growPrice;
    }

    public MerchantVegetable setGrowPrice(BigDecimal growPrice) {
        this.growPrice = growPrice;
        return this;
    }
    public Integer getCount() {
        return count;
    }

    public MerchantVegetable setCount(Integer count) {
        this.count = count;
        return this;
    }
    public Long getUrlId() {
        return urlId;
    }

    public MerchantVegetable setUrlId(Long urlId) {
        this.urlId = urlId;
        return this;
    }
    public Integer getGrowInventory() {
        return growInventory;
    }

    public MerchantVegetable setGrowInventory(Integer growInventory) {
        this.growInventory = growInventory;
        return this;
    }
    public BigDecimal getCommission() {
        return commission;
    }

    public MerchantVegetable setCommission(BigDecimal commission) {
        this.commission = commission;
        return this;
    }
    public Integer getHasCourier() {
        return hasCourier;
    }

    public MerchantVegetable setHasCourier(Integer hasCourier) {
        this.hasCourier = hasCourier;
        return this;
    }
    public Long getFreightId() {
        return freightId;
    }

    public MerchantVegetable setFreightId(Long freightId) {
        this.freightId = freightId;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String MERCHANT_ID = "merchant_id";

    public static final String REGION_ID = "region_id";

    public static final String PLOT_ID = "plot_id";

    public static final String CATEGORY_ID = "category_id";

    public static final String AVATAR = "avatar";

    public static final String IMG = "img";

    public static final String VIDEO = "video";

    public static final String OVERVIEW = "overview";

    public static final String CONTENT = "content";

    public static final String PRICE = "price";

    public static final String SALE = "sale";

    public static final String INVENTORY = "Inventory";

    public static final String TITLE = "title";

    public static final String TYPE = "type";

    public static final String GROW_PRICE = "grow_price";

    public static final String COUNT = "count";

    public static final String URL_ID = "url_id";

    public static final String GROW_INVENTORY = "grow_inventory";

    public static final String COMMISSION = "commission";

    public static final String HAS_COURIER = "has_courier";

    public static final String FREIGHT_ID = "freight_id";

    @Override
    public String toString() {
        return "MerchantVegetable{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", merchantId=" + merchantId +
            ", regionId=" + regionId +
            ", plotId=" + plotId +
            ", categoryId=" + categoryId +
            ", avatar=" + avatar +
            ", img=" + img +
            ", video=" + video +
            ", overview=" + overview +
            ", content=" + content +
            ", price=" + price +
            ", sale=" + sale +
            ", inventory=" + inventory +
            ", title=" + title +
            ", type=" + type +
            ", growPrice=" + growPrice +
            ", count=" + count +
            ", urlId=" + urlId +
            ", growInventory=" + growInventory +
            ", commission=" + commission +
            ", hasCourier=" + hasCourier +
            ", freightId=" + freightId +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            MerchantVegetable.ID
            ,MerchantVegetable.STATUS
            ,MerchantVegetable.REMARK
            ,MerchantVegetable.VERSION
            ,MerchantVegetable.CREATE_TIME
            ,MerchantVegetable.UPDATE_TIME
            ,MerchantVegetable.MERCHANT_ID
            ,MerchantVegetable.REGION_ID
            ,MerchantVegetable.PLOT_ID
            ,MerchantVegetable.CATEGORY_ID
            ,MerchantVegetable.AVATAR
            ,MerchantVegetable.IMG
            ,MerchantVegetable.VIDEO
            ,MerchantVegetable.OVERVIEW
            ,MerchantVegetable.CONTENT
            ,MerchantVegetable.PRICE
            ,MerchantVegetable.SALE
            ,MerchantVegetable.INVENTORY
            ,MerchantVegetable.TITLE
            ,MerchantVegetable.TYPE
            ,MerchantVegetable.GROW_PRICE
            ,MerchantVegetable.COUNT
            ,MerchantVegetable.URL_ID
            ,MerchantVegetable.GROW_INVENTORY
            ,MerchantVegetable.COMMISSION
            ,MerchantVegetable.HAS_COURIER
            ,MerchantVegetable.FREIGHT_ID
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}